package org.example.dao.dto.user;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

/**
 * 日历信息
 * @author 22449
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CalenderDto {
    private String date;
    private Integer weekDay;
    private String name;

    public CalenderDto(LocalDate date, Integer weekDay){
        this.date = date.toString();
        this.weekDay = weekDay;
        switch (weekDay) {
            case 1:
                name = "周一";
                break;
            case 2:
                name = "周二";
                break;
            case 3:
                name = "周三";
                break;
            case 4:
                name = "周四";
                break;
            case 5:
                name = "周五";
                break;
            case 6:
                name = "周六";
                break;
            case 7:
                name = "周日";
                break;
            default:
                name = "无效的数字";
        }
    }


}